var Xiangmu = new Vue({

    el : '#Xiangmulist',
    data:{
        xiangmutext:'',
        xiangmu : {},
        xiangmulist : [],

        xiangmuId:'',
        show : false,					// 显示列表是否有数据

    },
    created : function() {
        var _this = this;

        $(".nav navbar-nav li").removeClass("active");
        $("#nav_xiangmu").addClass("active");

        _this.bindXiangmuList();
    },
    methods : {

        bindXiangmuList:function (){
            var _this = this;
            layer.open({type:3});
            $.post("/xiangmu/findAllBypage",{
                xiangmuname :'',
                pageindex : 1,
                pagesize : 999,
                rdm : Math.random()
            },function(ppData){
                layer.closeAll("loading");
                if (ppData != null){
                    if(ppData.result == "1"){
                        var data = ppData.resultContent;
                            _this.show = true;
                            _this.xiangmulist=data.XiangMuList;
                        }else {
                            _this.show = false;
                        }
                    }else{
                        layer.alert(ppData.message);
                    }
            },"json");
        },

        toVote:function (xiangmuid,xiangmuleixing,lunci){
            location.href = "../../vote/vote?xiangmuid="+xiangmuid+"&xiangmuleixing="+xiangmuleixing;
        },

    },
    watch :{

    }
});